local ____lualib = require("lualib_bundle")
local __TS__Class = ____lualib.__TS__Class
local __TS__SetDescriptor = ____lualib.__TS__SetDescriptor
local __TS__New = ____lualib.__TS__New
local __TS__SourceMapTraceBack = ____lualib.__TS__SourceMapTraceBack
__TS__SourceMapTraceBack(debug.getinfo(1).short_src, {["8"] = 6,["9"] = 6,["10"] = 6,["11"] = 14,["12"] = 15,["13"] = 16,["14"] = 14,["19"] = 49,["27"] = 56,["35"] = 63,["39"] = 26,["40"] = 27,["41"] = 28,["42"] = 26,["43"] = 36,["44"] = 37,["45"] = 37,["46"] = 37,["47"] = 37,["48"] = 38,["49"] = 39,["50"] = 40,["52"] = 42,["53"] = 36,["54"] = 69,["55"] = 70,["56"] = 69,["57"] = 76,["58"] = 77,["59"] = 76,["60"] = 84,["61"] = 85,["62"] = 84,["63"] = 92,["64"] = 93,["65"] = 92,["66"] = 100,["67"] = 101,["68"] = 100,["69"] = 109,["70"] = 110,["71"] = 109});
local ____exports = {}
____exports.default = __TS__Class()
local KUi = ____exports.default
KUi.name = "KUi"
function KUi.prototype.____constructor(self, id, player)
    self.id = id
    self.player = player
end
__TS__SetDescriptor(
    KUi.prototype,
    "name",
    {get = function(self)
        return gameapi.get_ui_comp_name(self.player.handle, self.id)
    end},
    true
)
__TS__SetDescriptor(
    KUi.prototype,
    "parent",
    {get = function(self)
        return __TS__New(____exports.default, self.parentId, self.player)
    end},
    true
)
__TS__SetDescriptor(
    KUi.prototype,
    "parentId",
    {get = function(self)
        return gameapi.get_ui_comp_parent(self.player.handle, self.id)
    end},
    true
)
function KUi.createByModule(self, player, id, pid)
    local ui = gameapi.create_ui_prefab_instance(player.handle, id, pid)
    return __TS__New(____exports.default, "", player)
end
function KUi.searchPath(self, player, path)
    local uid = gameapi.get_comp_by_absolute_path(
        player.handle,
        table.concat(path, ".")
    )
    if uid == nil then
        logUtil:error("ui控件不存在: " .. table.concat(path, "."))
        return nil
    end
    return __TS__New(____exports.default, uid, player)
end
function KUi.prototype.open(self)
    gameapi.set_ui_comp_enable(self.player.handle, self.id, true)
end
function KUi.prototype.disable(self, value)
    gameapi.set_ui_comp_enable(self.player.handle, self.id, not value)
end
function KUi.prototype.visible(self, value)
    gameapi.set_ui_comp_visible(self.player.handle, value, self.id)
end
function KUi.prototype.setText(self, value)
    gameapi.set_ui_comp_text(self.player.handle, self.id, value)
end
function KUi.prototype.setImage(self, value)
    gameapi.set_ui_comp_image(self.player.handle, self.id, value)
end
function KUi.prototype.setPos(self, x, y)
    gameapi.set_ui_comp_pos(self.player.handle, self.id, x, y)
end
return ____exports
